package com.gdpu.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gdpu.model.OmsOrderItem;
import com.gdpu.model.OmsOrderItem;
import com.gdpu.model.PmsGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:weiming
 * @Date:2021/6/1
 */
public interface PmsGoodDao extends BaseMapper<PmsGoods> {

    /**
     * 批量减商品库存
     * @param orderItemList
     * @return
     */
    int updateGoodInfoBatch(@Param("list") List<OmsOrderItem> orderItemList);

    /**
     * 库存回滚
     * @param orderItemList
     * @return
     */
    int rollBackGoodStockBatch(@Param("list") List<OmsOrderItem> orderItemList);
}
